import axios from '~/axios'

//添加企业用户账号
export function addEnterpriseAccountApi(data) {
    return axios.post('/basic/lindi/enterpriseAccount/addEnterpriseAccount', data)
}

//删除企业用户账号
export function deleteEnterpriseAccountByEnterpriseAccountIdApi(enterpriseAccountId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/enterpriseAccount/deleteEnterpriseAccountByEnterpriseAccountId',
        params: {
            enterpriseAccountId: enterpriseAccountId
        }
    })
}

//修改企业用户账号
export function updateEnterpriseAccountByEnterpriseAccountIdApi(data) {
    return axios.put('/basic/lindi/enterpriseAccount/updateEnterpriseAccountByEnterpriseAccountId', data)
}

//获取企业用户账号列表 - 分页
export function getPageEnterpriseAccountListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/enterpriseAccount/getPageEnterpriseAccountList',
        params: params
    })
}

//获取企业用户账号详细信息
export function getEnterpriseAccountByEnterpriseAccountIdApi(enterpriseAccountId) {
    return axios.get(`/basic/lindi/enterpriseAccount/getEnterpriseAccountByEnterpriseAccountId/${enterpriseAccountId}`)
}

//获取企业用户账号密码信息
export function getEnterpriseAccountPasswordApi(enterpriseMobile) {
    return axios.get(`/basic/lindi/enterpriseAccount/getPasswordByEnterpriseMobile/${enterpriseMobile}`)
}

export function getEnterpriseAccountListApi() {
    return axios.get('/basic/lindi/enterpriseAccount/getEnterpriseAccountList')
}
